﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace IrisGenerator.Framework.Messaging
{
    public abstract class MessageSender<T>:IMessageSender<T>
    {
        #region IMessageSender<T> Members

        public event EventHandler<MessageEventArgs<T>> MessageSend;

        public MessageResults OnMessageSend(MessageEventArgs<T> e)
        {
            if (MessageSend != null)
            {
                MessageSend(this, e);
                return e.Message.Result;
            }
            return MessageResults.None;
        }

        #endregion
    }
}
